package cn.cpf.spring.service;

import cn.cpf.spring.dao.TestDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TestService {

    private TestDao testDao;

    public void insert() {
        if (testDao == null) {
            System.out.println("new a dao");
            testDao = new TestDao();
        }
        testDao.insert();
    }

}
